package com.mzule.simplemail;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import javax.mail.MessagingException;
import javax.mail.internet.AddressException;

public class Test {

    /**
     * @param args
     * @throws MessagingException 
     */
    public static void main(String[] args) throws MessagingException {
        ConcurrentHashMap<String, String> callMap=new ConcurrentHashMap<String, String>();
//      callMap.put("", "");
//      System.out.println("".compareTo("123"));
      SimpleMailSender serviceSms=serviceSms = new SimpleMailSender("121.14.53.134","xbzhao@189.cn",
              "lnsw_ctyun","25");
//        SimpleMailSender serviceSms=serviceSms = new SimpleMailSender("24289532@qq.com",
//                "!@#tonglin3");
        StringBuffer theMessage = new StringBuffer();
                 theMessage.append("<h2><font size='2' color=red>这倒霉孩子</font></h2>");
                 theMessage.append("<hr>");
                 theMessage.append("<i>年年失望年年望</i>");
                 List<String> ss=new ArrayList<String>();
                 ss.add("24289532@qq.com");
        try {
            serviceSms.send(ss, "测试", theMessage);
        } catch (AddressException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (MessagingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}
